﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Data;
using KPIS.GERP.GIMS.MODEL;
using KPIS.GERP.GIMS.DAL;
using KPIS.GERP.GIMS.DALFactory;
using KPIS.DBM;

namespace KPIS.GERP.GIMS.BLL
{
    public class PurchaseOrderPenaltyBLL
    {
        private static readonly PurchaseOrderPenaltyDAL dal = DataAccess.CreatePurchaseOrderPenalty();

        public PurchaseOrderPenaltyBLL()
        {

        }

        public PurchaseOrderPenaltyInfo GetPurchaseOrderPenalty(int seq)
        {
            return dal.GetPurchaseOrderPenalty(seq);
        }

        public IList<PurchaseOrderPenaltyInfo> GetPurchaseOrderPenaltyWithParent(int PoSeq)
        {
            return dal.GetPurchaseOrderPenaltyWithParent(PoSeq);
        }

        public IList<PurchaseOrderPenaltyInfo> GetPurchaseOrderPenaltyWithSearch(int po_seq, string search_text)
        {
            return dal.GetPurchaseOrderPenaltyWithSearch(po_seq, search_text);
        }

        public IList<PurchaseOrderPenaltyInfo> GetPurchaseOrderPenaltyWithSearchFromDeliveryNote(int dn_seq, string search_text)
        {
            return dal.GetPurchaseOrderPenaltyWithSearchFromDeliveryNote(dn_seq, search_text);
        }

        public void Insert(IList<PurchaseOrderPenaltyInfo> infoList, Nullable<int> po_seq, PurchaseOrderInfo info, IDBManager dbManagerTrans)
        {
            dal.Insert(infoList, po_seq, info, dbManagerTrans);
        }

        public void Insert(PurchaseOrderPenaltyInfo info)
        {
            dal.Insert(info);
        }

        public void Update(PurchaseOrderPenaltyInfo info)
        {
            dal.Update(info);
        }

        public void DeleteAll(IList<PurchaseOrderPenaltyInfo> infoList)
        {
            dal.DeleteAll(infoList);
        }
    }
}
